package src.test;

import src.helpers.Barrier;

public class Baby extends Thread{ 
	private int n; 
	
	Barrier b = new Barrier(2);
	
	public Baby(int n, Barrier bar) {
		this.n = n;
		b = bar;
	}
	 public void run() { //no arguments!
		 for(int i = 0; i < n; i++) { 
			 System.out.println("Hello World");
		 try{
			 b.block();
			 System.out.println("teet");
		 	} catch (InterruptedException e)
			 {System.out.println("trouble!");}
		 }
		 
	 }
	
}
